import {
  HostComponent,
  ClassComponent,
  FunctionComponent,
  Fragment,
  HostText,
} from './ReactWorkTags';
import {
  updateHostComponent,
  updateHostTextComponent,
  updateFunctionComponent,
  updateClassComponent,
} from './ReactFiberReconciler';
export default function beginWork(wip) {
  const tag = wip.tag;
  switch (tag) {
    case HostComponent:
      updateHostComponent(wip);
      break;

    case ClassComponent:
      return updateClassComponent(wip);

    case FunctionComponent:
      return updateFunctionComponent(wip);
    // case Fragment:
    //   return beginWorkFragment(wip);
    case HostText:
      updateHostTextComponent(wip);
      break;
    default:
      return null;
  }
}
